﻿using ITXHWEB.Models;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Web.Mvc;
using WPFExcelReport;
using WPFExcelReport.Helpers;
using ITXHWEB.Infrastructure;
using System.Collections;
using System.Collections.Generic;
namespace ITXHWEB.Controllers
{
    public partial class VVTLIEFController : ITXController
    {
   
        /// <summary>
        /// 展示当前记录
        /// </summary>
        /// <param name="returnUrl"></param>
        /// <returns></returns>
        [ChildActionOnly]
        public ActionResult MVVTLIEF(string returnUrl)
        {
            ModelState.Clear(); 
            ViewBag.MVVT = MABF.CVVT;
            ViewBag.ReturnUrl = returnUrl;
            VVTLIEFModel mx = new VVTLIEFModel(); 
            mx.REMARK = (TWBS - HWBS).ToString() + "-待入库:" + CPWBS.ToString();
            mx.FARBE = HWBS.ToString() + "-已入库";
            mx.ART = VKPAUF + LIEFSCH+ INFO; 
            return PartialView(mx);
        }
        [HttpPost]
        [AllowAnonymous]
        [ValidateAntiForgeryToken]
        public ActionResult MVVTLIEF(VVTLIEFModel model, string returnUrl)
        {
            IsVKPReady = false;
            IsVVTReady = false;
            MABF.IsVVTReady = false;
            MABF.IsPDCReady = false;
            MABF.IsVKPReady = false;
            VKPAUF = "";
            LIEFSCH = "";
            TWBS = 0;
            HWBS = 0;
            try
            {
                VHP.VWBW.POSTCHG();
            }
            catch (Exception ex)
            {
                VKPAUF = ex.Message;
                Tracer.Error(ex.StackTrace, ex);
            }
            return RedirectToAction(MAPP, MAPP);
        }
      
    }
}
